<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<form class="form-horizontal" role="form" action="{:url('./addData')}" method="post" enctype="multipart/form-data">
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">分类名称</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" id="firstname" name="name">
    </div>
  </div>
  <div class="form-group">
    <label  class="col-sm-2 control-label">上级菜单
    </label>
    <div class="col-sm-10">
      <select class="form-control" name="pid">
        {foreach $data as $val}
        <option value="{$val.id}">{$val.name}</option>
        {/foreach}
      </select>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">是否热门</label>
    <div class="col-sm-10">
      <input type="radio" class="form-control" name="ishot" value="1">是
      <input type="radio" class="form-control" name="ishot" value="0">否
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">是否显示</label>
    <div class="col-sm-10">
      <input type="radio" class="form-control" name="isshow" value="1">是
      <input type="radio" class="form-control" name="isshow" value="0">否
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">分类LOGO</label>
    <div class="col-sm-10">
      <input type="file" class="form-control" name="image">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default">提交</button>
    </div>
  </div>
</form>

</body>
</html>